import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect:"/login"
  },
  {
    path:"/login",
    name:"Login",
    component:()=> import('../components/Login')
  },
  {
    path:"/index",
    name:"Index",
    component:()=> import('@/views/HomeView.vue')
  },
  {
    path:"/article",
    name:"Article",
    component:()=> import('@/components/ArticleComponent.vue')
  },
  {
    path:"/admin/user",
    name:"User",
    component:()=> import('@/components/UserComponent.vue')
  },
  {
    path:"/sfzy",
    name:"Sfzy",
    component:()=> import('@/components/SfzyComponent.vue')
  },
  {
    path:"/admin/componey",
    name:"Componey",
    component:()=> import('@/components/ComponeyComponet.vue')
  },
  {
    path:"/course/course",
    name:"Componey",
    component:()=> import('@/components/CourseComponet.vue')
  },
  {
    path: "/register",
    name: "register",
    component:()=>import("../components/Register")
  },
  {
    path: "/manger",
    name: "mange",
    component:()=>import("../views/MangerView")
  },
  {
    path: "/gongyi",
    name: "gongyi",
    component:()=>import("../components/GongyiComponent")
  }
  // {
  //   path: "/",
  //   redirect:"/login"
  // },
  // {
  //   path: "/login",
  //   component:()=>import("../components/Login")
  // },
  // {
  //   path:"/home",
  //   component:()=>import("../components/IndexComponent")
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
